﻿using System;
using System.Runtime.InteropServices;

namespace AudioVideoConversation
{
    internal class LyncModelExceptionHelper
    {
        /// <summary>
        /// Lync Model APIのシステムエラーエクセプション
        /// </summary>
        /// <param name="ex">SystemException</param>
        /// <returns></returns>
        static internal bool IsLyncException(SystemException ex)
        {
            return
                ex is NotImplementedException ||
                ex is ArgumentException ||
                ex is NullReferenceException ||
                ex is NotSupportedException ||
                ex is ArgumentOutOfRangeException ||
                ex is IndexOutOfRangeException ||
                ex is InvalidOperationException ||
                ex is TypeLoadException ||
                ex is TypeInitializationException ||
                ex is InvalidComObjectException ||
                ex is InvalidCastException;
        }
    }
}
